"""测试用例的常量配置"""
import sys

env = sys.argv[1]
if env == 'erp':
        API_URL = "http://192.168.10.164:5173/"

        TESTCASE_EXCEL = "./data/erp_data.xlsx"

        TESTCASE_SHEET = "erp_data"

        SQL_CONNECTION = {
                "host": "192.168.10.164",
                "user": "root",
                "password": "123456",
                "database": "xingyun",
                "port": 3306,
                "autocommit":True
        }

        DEL_SQL = [
                # "DELETE from sp_manager WHERE mg_name = 'jzc_test'",
                # "DELETE from sp_role WHERE role_name = 'niuma'",
                # "DELETE FROM sp_category WHERE cat_name = '游戏机'",
                # "DELETE FROM sp_attribute WHERE attr_name = '内存'"
        ]

        #读取测试用例时忽略某一行
        SKIP_ROWS = [1]

        #理想的响应时长
        RESPONSE_TIME_LIMIT = 1

elif env == 'zentao':
        API_URL = "http://192.168.10.131:8888/"
        TESTCASE_EXCEL = "./data/zentao_data.xlsx"
        TESTCASE_SHEET = "zentao_data"
        SQL_CONNECTION = {
                "host": "192.168.10.131",
                "user": "root",
                "password": "123456",
                "database": "mydb",
                "port": 3306,
                "autocommit": True
        }
        DEL_SQL = [
                "DELETE from sp_manager WHERE mg_name = 'jzc_test'",
                "DELETE from sp_role WHERE role_name = 'niuma'",
                "DELETE FROM sp_category WHERE cat_name = '游戏机'",
                "DELETE FROM sp_attribute WHERE attr_name = '内存'"
        ]

elif env == 'hospital':
        API_URL = "http://hospital_back:9281/"

        TESTCASE_EXCEL = "./data/hospital_testcas.xlsx"

        TESTCASE_SHEET = "hospital"

        SQL_CONNECTION = {
                "host": "hospital_mysql",
                "user": "root",
                "password": "123456",
                "database": "hospital_manager",
                "port": 3306,
                "autocommit":True
        }

        DEL_SQL = []

        #读取测试用例时忽略某一行
        SKIP_ROWS = [1]

        #理想的响应时长
        RESPONSE_TIME_LIMIT = 1